from selenium import webdriver
options = webdriver.ChromeOptions()
# 添加保持登录的数据路径：安装目录一般在C:\Users\黄\AppData\Local\Google\Chrome\User Data
options.add_argument(r"user-data-dir=C:\Users\guoff\AppData\Local\Google\Chrome\User Data")
driver = webdriver.Chrome(executable_path='chromedriver.exe') #executable_path='chromedriver.exe',,chrome_options=options

print(121212,'driver',driver)
driver.get('https://www.daimaru-matsuzakaya.jp/CreditCard')
print(22222,'driver',driver)
driver.add_cookie(cookie_dict={"name":"YSPCD","value":"dmz"})
driver.add_cookie(cookie_dict={"name":"YSITEID","value":"4"})
driver.add_cookie(cookie_dict={"name":"FormAssist_1tag","value":"view"})
driver.add_cookie(cookie_dict={"name":"_ga","value":"GA1.2.430707676.1557625578"})
driver.add_cookie(cookie_dict={"name":"_gid","value":"GA1.2.332915399.1557625578"})
driver.add_cookie(cookie_dict={"name":"FormAssist_cookie","value":"jfr/20181109171257/20190512/104615-862"})
driver.add_cookie(cookie_dict={"name":"__bvr_s1d","value":"jf1L5Y1TTpMIGQRntKgoxbRXXwJdvA"})
driver.add_cookie(cookie_dict={"name":"__ulfpc","value":"201905120946207997"})
driver.add_cookie(cookie_dict={"name":"companyec_visitor","value":"cqSw5tXvNcfNEgh9d9HbCyhhwtjtx3yoKTnEADzdpKRojJfuKZl9puYuB2gcYIosZZ6QANbErx3CIbDZILvouuAB5rSnaDwNAL70uEUD9WBpSJZdYzlOG28uv2ig3daB4rrnkGq7JUvDJ9othdQcGBiH9NxBGZpDaEYrYaDXKd0aNNSnjewwsOfrvZOJNs1BgqpCTCgZqCqkLfs8TlN6GWPWk38MyF4AMR7XVG0phFcmVyGPJZOW26izzzcZlD5swIC1dcw6i0aGf20Iw06FjDazwr9XIhyQ2G3q60xLJKpm"})
driver.add_cookie(cookie_dict={"name":"companyec_session","value":"B4PX4vSnxGG7upzN8bvE7ewR9noHzAG8ro1kRv7QSpKp8pouLATNng6CFTtn7re7MhqarfiuKPb3XhGYamjfClNZcKVL8MPvgvcaGhTpc136IlwrvP3ggXYSMw5WuuS6jBJAV1aV9eoc7tDGjmEGZ9YYpqvuqvwZTKUYzq3DG7wAdXywhONMLKhWCzKy05kiIzyMDE0F0TlDZn7zI21EQRto1s2e3twQp8XE99ghbD5jriabG12ZhVIrbUbzDPP49iVGhbS1RkGdsY9feE1b9URvM4CshOuT1QVUQC6MU0B1"})
driver.add_cookie(cookie_dict={"name":"_fbp","value":"fb.1.1557625583902.1578749174"})
driver.add_cookie(cookie_dict={"name":"company_context","value":"1.0.302.0:"})
driver.add_cookie(cookie_dict={"name":"JSESSIONID","value":"00001C0eCG8V68_TMOBRXHkPOhC:1bt4hvbfo"})
driver.add_cookie(cookie_dict={"name":"CSI","value":"ZE9QL9QGlT6uf600cNAd1zPxjwP5bGfeLqjW-1oiC9Cnn*m_2p"})
driver.add_cookie(cookie_dict={"name":"SCSI","value":"150c2d425cce1ce81eeb6131ebae8b78dffa1b6d9cdfccce0d56f8622c30484d"})
driver.add_cookie(cookie_dict={"name":"DSCSI","value":"4724754d-b8d0-4909-b5c4-dc2f452019a3"})
driver.add_cookie(cookie_dict={"name":"ALI","value":"ZE9QL9QGlT6uf600cNAd1zPxjwP5bGfeLqjW-1oiC9Cnn*m_2p"})
driver.add_cookie(cookie_dict={"name":"CI","value":"b87a8e28fc97c21aae168aea62c7d204"})
driver.add_cookie(cookie_dict={"name":"SI","value":"6sX4Hmc5t056qem7c9COFbaB8P0t20x40Tr6Lo2Y8nWP5H6Yz8"})
driver.add_cookie(cookie_dict={"name":"T","value":"CYPsyA8beCuDTr5J8uI47ToLqFRtNLp7MUE9MT8Gdh5R5TMHf7"})
driver.add_cookie(cookie_dict={"name":"BUI","value":"Xwa@bsdH4k@M3uFmyWGHA*A$47OMU2EvTsyX_OWUl6ZFUhuTFi"})
driver.add_cookie(cookie_dict={"name":"__sna_s1d","value":"jf1L5Y1TTpMIGQRntKgoxbRXXwJdvA"})
print(33333,'driver',driver)
driver.implicitly_wait(10)  # 隐性等待
print(11111,'driver',driver)
driver.get('https://www.daimaru-matsuzakaya.jp/CreditCard')
print(44444,'driver',driver)